/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ucsur.tp.libreriaelsaber.desktop.forms;

import javax.swing.JFrame;

/**
 *
 * @author JuanCarlos_2
 */
public class FormPrincipal extends javax.swing.JFrame {

  /**
   * Creates new form FormPrincipal
   */
  public FormPrincipal() {
    initComponents();
    setExtendedState(JFrame.MAXIMIZED_BOTH);
  }

  /**
   * This method is called from within the constructor to initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is always
   * regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        desktopPanelPrincipal = new javax.swing.JDesktopPane();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuMantenimiento = new javax.swing.JMenu();
        mnuItemMantenimientoUsuarios = new javax.swing.JMenuItem();
        mnuConsultas = new javax.swing.JMenu();
        mnuReportes = new javax.swing.JMenu();
        mnuSalir = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Librería El Saber - Sistema (Pantalla Principal)");

        desktopPanelPrincipal.setBackground(new java.awt.Color(204, 204, 204));

        jLabel1.setFont(new java.awt.Font("Tahoma", 3, 48)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(0, 51, 204));
        jLabel1.setText("Libreria El Saber");
        jLabel1.setBounds(10, 10, 396, 58);
        desktopPanelPrincipal.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        mnuMantenimiento.setForeground(new java.awt.Color(51, 153, 0));
        mnuMantenimiento.setText("Mantenimientos");
        mnuMantenimiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuMantenimientoActionPerformed(evt);
            }
        });

        mnuItemMantenimientoUsuarios.setText("Usuarios");
        mnuItemMantenimientoUsuarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuItemMantenimientoUsuariosActionPerformed(evt);
            }
        });
        mnuMantenimiento.add(mnuItemMantenimientoUsuarios);

        jMenuBar1.add(mnuMantenimiento);

        mnuConsultas.setForeground(new java.awt.Color(51, 153, 0));
        mnuConsultas.setText("Consultas");
        jMenuBar1.add(mnuConsultas);

        mnuReportes.setForeground(new java.awt.Color(51, 153, 0));
        mnuReportes.setText("Reportes");
        jMenuBar1.add(mnuReportes);

        mnuSalir.setForeground(new java.awt.Color(51, 153, 0));
        mnuSalir.setText("Salir");
        jMenuBar1.add(mnuSalir);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(desktopPanelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 631, Short.MAX_VALUE)
                .addGap(45, 45, 45))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(desktopPanelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
                .addGap(46, 46, 46))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnuMantenimientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuMantenimientoActionPerformed
    }//GEN-LAST:event_mnuMantenimientoActionPerformed

  private void mnuItemMantenimientoUsuariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuItemMantenimientoUsuariosActionPerformed
    // TODO add your handling code here:
    FormUsuario usuario = new FormUsuario();
    desktopPanelPrincipal.add(usuario);
    usuario.setVisible(true);
  }//GEN-LAST:event_mnuItemMantenimientoUsuariosActionPerformed

  /**
   * @param args the command line arguments
   */
  public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(FormPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {
      public void run() {
        new FormPrincipal().setVisible(true);
      }
    });
  }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane desktopPanelPrincipal;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu mnuConsultas;
    private javax.swing.JMenuItem mnuItemMantenimientoUsuarios;
    private javax.swing.JMenu mnuMantenimiento;
    private javax.swing.JMenu mnuReportes;
    private javax.swing.JMenu mnuSalir;
    // End of variables declaration//GEN-END:variables
}
